package com.foreknow.oppExer1.exer10;

/**
 * @author shkstart
 * @create 2021-07-28 15:26
 */
public class SalariedEmployee extends Employee{
    private double monthlySalary;
    private double birsalary=0;

    public void setBirsalary(double birsalary) {
        this.birsalary = birsalary;
    }

    @Override
    public double  earnings() {
        return monthlySalary+birsalary;
    }

    public SalariedEmployee() {
    }

    public SalariedEmployee(String name, String number, MyDate birthday, double monthlySalary) {
        super(name, number, birthday);
        this.monthlySalary = monthlySalary;
    }

    @Override
    public String toString() {
        return super.toString();

    }
}
